import 'package:flutter/material.dart';
import 'package:flutter_app/components/layout.dart';
class RegisterPage extends StatefulWidget {
  @override
  _RegisterPageState createState() => _RegisterPageState();
}

class _RegisterPageState extends State<RegisterPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        iconTheme: IconThemeData(
          color: Colors.black, //修改颜色
        ),
        backgroundColor: Colors.transparent,
        elevation: 0,
        actions: [
          TextButton(
              onPressed: () {
                Navigator.pushNamed(context, '/login');
              },
              child: Text('登录'))
        ],
      ),
      body:Container(
        padding: EdgeInsets.symmetric(horizontal: 20.0),
        child: ColumnStart(
          children:[
            SizedBox(
              height: 40,
            ),
            Text('使用手机号开始注册吧',
                style: TextStyle(fontSize: 17, color: Colors.black)),
            SizedBox(
              height: 40,
            ),
            TextField(
                decoration: InputDecoration(
                    hintText: '邮箱或手机号',
                    hintStyle: TextStyle(color: Colors.grey),
                    contentPadding: const EdgeInsets.symmetric(vertical: 0.0))),
            SizedBox(
              height: 70,
            ),
            Container(
              height: 45,
              width: MediaQuery.of(context).size.width,
              child: FlatButton(
                  color: Colors.blueAccent,
                  textColor: Colors.white,
                  onPressed: () {},
                  child: Text('下一步')),
            ),
            Container(
                alignment: Alignment.centerRight,
                child: TextButton(onPressed: () {}, child: Text('邮箱注册'))
            )
          ]
        ),
      )
    );
  }
}
